package com.yangye.niodemo.rpc.server;

import com.yangye.niodemo.rpc.client.RpcClient;
import com.yangye.niodemo.rpc.client.TestRpcClient;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @author yangye
 * @date 2020/12/29
 */
public class Dispatcher {

	public static Map<String, Object> map = new ConcurrentHashMap<>();

	static {
		TestRpcClient rpcClient = new RpcClient();
		map.putIfAbsent(TestRpcClient.class.getName(), rpcClient);
	}

	public static Object get(String key) {
		return map.get(key);
	}

}
